﻿/**
 * Created by h p on 2016/4/7.
 */
import java.util.Scanner;

public class ex1 {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        Scanner n = new Scanner(System.in);
        Scanner u = new Scanner(System.in);
        Scanner c = new Scanner(System.in);
	
	System.out.printf("已修改（版面）\n");
        Student student = new Student();

        System.out.printf("请输入要处理的学生学号\n");
        student.number = u.next();

        System.out.printf("请输入要处理的学生姓名\n");
        student.name = n.next();

        System.out.printf("请输入要处理的学生分数\n");
        student.mark = s.nextInt();

        System.out.printf("请选择要对该学生成绩进行的操作\n");
        System.out.printf("1.对成绩评级\n2.打印学生信息\n");
       int ch = c.nextInt();
        ex1 ex = new ex1();
        switch(ch){
            case(1):
                ex.level(student.mark);
                break;
            case(2):
                ex.print(student.number,student.name,student.mark);
        }

    }
    public void level(int score) {
            char level;
            if (score >= 90) {
                level = 'A';
            } else if (score >= 80 && score < 90) {
                level = 'B';
            } else if (score >= 70 && score < 80) {
                level = 'C';
            } else if (score >= 60 && score < 70) {
                level = 'D';
            } else {
                level = 'E';
            }
            System.out.println("得分等级：" +  level );
    }
    public void print(String num,String nam,int Mark){
        System.out.printf("该学生学号:" + num + " 姓名：" + nam + "成绩" + Mark);
    }
}



